#!/usr/bin/env python
# *_*coding:utf-8 *_*

"""
座右铭:努力努力再努力！
@project:restfulproject
@author:Tse
@file:urls.PY
@ide:PyCharm
@time:2018-12-06 20:21:43
"""
from django.urls import path, re_path, include
from apitest.views import *

urlpatterns = [
    # 用户认证API接口
    path('auth/', AuthView.as_view()),
    # 商品列表页API接口
    path('order/', OrderView.as_view(), name='order'),
    # 商品详情页API接口
    path('detail/', OrderDetailView.as_view()),

    # serializer的接口
    path('roles/', RoleView.as_view()),
    path('users/', UserView.as_view()),
    path('groups/', GroupView.as_view()),
    path('valication/', ValicationView.as_view()),
    path('pagination/', PaginationView.as_view()),
    path('gen/', GenericAPIView.as_view()),
    # 得到所有数据
    path('genviewset/', GenericViewSetView.as_view({'get': 'list'})),
    # # 得到一个数据
    path('genviewset/<int:pk>/', GenericViewSetView.as_view({'get': 'retrieve'})),
]
